﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;

namespace MY.WCF.Hosting
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            ServiceBase[] ServicesToRun;//初始化父类数组
            ServicesToRun = new ServiceBase[] //实例化该数组，数组中只有一个子类实例元素
			{ 
				new CalculatorHost() 
			};
            ServiceBase.Run(ServicesToRun);//调用父类Run方法，以子类为参数，功能是运行子类实例
        }
    }
}
